/*!* 确保Markdown内容左对齐 *!*/
.markdown-body {
    text-align: left !important;
}

/* 调整Markdown标题对齐 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    text-align: left;
}

/* 列表项左对齐 */
.markdown-body ul,
.markdown-body ol {
    padding-left: 2em;
}

/* 表格内容左对齐 */
.markdown-body table {
    text-align: left;
}

/* 代码块左对齐 */
.markdown-body pre {
    text-align: left;
}
/* 添加以下样式到 DocGroupView.css */

.markdown-editor-container {
    width: 100%;
    max-width: 800px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.markdown-editor {
    min-height: 500px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
}

.markdown-editor h1,
.markdown-editor h2,
.markdown-editor h3,
.markdown-editor h4,
.markdown-editor h5,
.markdown-editor h6 {
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    font-weight: 600;
    line-height: 1.25;
    cursor: text;
    position: relative;
}

.markdown-editor h1 {
    font-size: 2em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.3em;
}

.markdown-editor h2 {
    font-size: 1.75em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.markdown-editor h3 { font-size: 1.5em; }
.markdown-editor h4 { font-size: 1.25em; }
.markdown-editor h5 { font-size: 1em; }
.markdown-editor h6 { font-size: 0.875em; color: #777; }

.markdown-editor p {
    margin: 0 0 16px;
    line-height: 1.7;
}

.markdown-editor ul,
.markdown-editor ol {
    padding-left: 2em;
    margin-bottom: 16px;
}

.markdown-editor li {
    margin-bottom: 0.5em;
}

.markdown-editor blockquote {
    margin: 0 0 16px;
    padding: 0 15px;
    color: #6a737d;
    border-left: 4px solid #dfe2e5;
}

.markdown-editor pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin-bottom: 16px;
}

.markdown-editor code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 85%;
}

.markdown-editor pre code {
    background: none;
    padding: 0;
}

.markdown-editor strong {
    font-weight: 600;
}

.markdown-editor em {
    font-style: italic;
}

.markdown-editor a {
    color: #0366d6;
    text-decoration: none;
}

.markdown-editor a:hover {
    text-decoration: underline;
}

.markdown-editor table {
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
}

.markdown-editor th,
.markdown-editor td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-editor th {
    font-weight: 600;
    background-color: #f6f8fa;
}

.markdown-editor img {
    max-width: 100%;
    box-sizing: content-box;
    background-color: #fff;
}

.markdown-editor hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

/* 代码块样式 */
.markdown-editor .hljs,
.w-md-editor-preview pre,
.w-md-editor-preview-block,
.w-md-editor-preview code,
.markdown-body pre,
.markdown-body code {
    display: block;
    overflow-x: auto;
    padding: 16px;
    border-radius: 4px;
    background: #fff !important;
    border: 1px solid #e8e8e8;
}

/* 表格样式 */
.markdown-body table,
.w-md-editor-preview table,
.markdown-editor table {
    background: #fff !important;
    border-collapse: collapse;
}

.markdown-body th,
.markdown-body td,
.w-md-editor-preview th,
.w-md-editor-preview td,
.markdown-editor th,
.markdown-editor td {
    background: #fff !important;
    border: 1px solid #e8e8e8;
    padding: 8px 12px;
}

.markdown-body th,
.w-md-editor-preview th,
.markdown-editor th {
    background: #f8f9fa !important;
    font-weight: 600;
}

/* 占位符样式 */
.markdown-editor [data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: #aaa;
    font-style: italic;
}

/* 行内代码样式 */
.markdown-editor code:not(.hljs) {
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 85%;
}

/* 自定义编辑器样式 */
.wmde-markdown {
    padding: 16px;
    background-color: #fafafa;
}

/* Full-width editor styles */
.w-md-editor {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.w-md-editor-content {
    height: calc(100vh - 120px) !important;
}

/* 自定义工具栏样式 */
.wmde-toolbar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 8px;
}

/* 编辑模式下MDEditor背景强制白色 */
.wmde-markdown,
.w-md-editor,
.w-md-editor-toolbar,
.w-md-editor-toolbar .w-md-editor-toolbar-inner {
    background: #fff !important;
}

/* Remove borders and padding from editor container */
.w-md-editor-bar,
.w-md-editor-input,
.w-md-editor-preview {
    border: none !important;
}

/* Ensure editor takes full width */
.w-md-editor-input,
.w-md-editor-preview {
    width: 50% !important;
    padding: 0 !important;
}

/* Ensure editor container takes full width */
.w-md-editor-content {
    border: none !important;
    padding: 0 !important;
}

/* 工具栏图标颜色深色 */
.w-md-editor-toolbar .w-md-editor-toolbar-inner svg {
    color: #222 !important;
    fill: #222 !important;
}

/* 滚动条背景为白色 */
body, .App, .markdown-body, .w-md-editor, .w-md-editor-content, .w-md-editor-toolbar {
    background: #fff !important;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    background: #fff;
}
::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* 文章内容字体为黑色 */
.markdown-body {
    color: #222 !important;
}

/* 富文本编辑器字体为黑色 */
.w-md-editor,
.w-md-editor-content,
.w-md-editor-toolbar,
.wmde-markdown {
    color: #222 !important;
}

/* 目录字体颜色全为黑色 */
.markdown-navbar,
.markdown-navbar * {
    color: #222 !important;
}